import { createApp } from 'vue'
import App from './App.vue'

import ElementPlus from 'element-plus';
import 'element-plus/lib/theme-chalk/index.css';

import 'highlight.js/styles/atom-one-light.css' //主题样式atom-one-light atom-one-dark rainbow等，可到官网查询
import 'highlight.js/lib/common'
import hljsVuePlugin from '@highlightjs/vue-plugin'

import VueCodemirror from 'vue-codemirror'
import { basicSetup } from '@codemirror/basic-setup'
import { javascript } from '@codemirror/lang-javascript'
import { oneDark } from '@codemirror/theme-one-dark'

const app = createApp(App)
app.use(ElementPlus, { size: 'small', zIndex: 3000 })
app.use(hljsVuePlugin)
app.use(VueCodemirror, {
    // optional default global options [vue-codemirror - npm](https://www.npmjs.com/package/vue-codemirror)
    autofocus: true,
    disabled: false,
    indentWithTab: true,
    tabSize: 2,
    extensions: [basicSetup, javascript(), oneDark],
    // ...
})
app.mount('#app')